import VueRouter from "vue-router"

//import Main from '../views/Main.vue'
import Home from '../views/home'

export default new VueRouter({
    routes:[

        {
            //登录界面的路由
            path: '/login',
            name: 'login',
            component: () => import('../views/Login/login.vue')
        },

        {
            path:'/home',
            name:'Main',
            //按需引入
            component: () => import('../views/Main.vue'),
            redirect: '/home',
            children:[
                /* {
                    path:'/home',
                    name:'home',
                    component: () => import('../views/home'),
                },
                {
                    path:'/User',
                    name:'User',
                    component: () => import('../views/User'),
                },
                {
                    path:'/all-orders',
                    name:'all-orders',
                    component: () => import('../views/order/all-orders'),
                },
                {
                    path:'/obligation',
                    name:'obligation',
                    component: () => import('../views/order/obligation'),
                },
                {
                    path:'/wait-deliver',
                    name:'wait-deliver',
                    component: () => import('../views/order/wait-deliver'),
                },
                {
                    path:'/wait-receive',
                    name:'wait-receive',
                    component: () => import('../views/order/wait-receive'),
                },
                {
                    path:'/wait-receive-user',
                    name:'wait-receive-user',
                    component: () => import('../views/order/wait-receive-user'),
                },
                {
                    path:'/completed',
                    name:'completed',
                    component: () => import('../views/order/completed'),
                },
                {
                    path:'/refunded',
                    name:'refunded',
                    component: () => import('../views/order/refunded'),
                },
                {
                    path:'/closed',
                    name:'closed',
                    component: () => import('../views/order/closed'),
                },
                {
                    path:'/distribution-mode',
                    name:'distribution-mode',
                    component: () => import('../views/order/distribution-mode'),
                }, */
            ]
        }
    ]
})